<?php

namespace zhtfrontend\models\datas;

use Yii;

/**
 * This is the model class for table "{{%art_relation}}".
 *
 * @property integer $art_teaching_id
 * @property integer $arrangement_id
 * @property integer $lesson
 */
class ArtRelation extends \zhtfrontend\components\bases\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%art_relation}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['art_teaching_id', 'arrangement_id', 'lesson'], 'integer'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'art_teaching_id' => Yii::t('zhtfrontend', '艺教学id'),
            'arrangement_id' => Yii::t('zhtfrontend', '排课表id'),
            'lesson' => Yii::t('zhtfrontend', '课次'),
        ];
    }

    public function getArrangement(){
        return $this->hasOne(Arrangement::className(),['id'=>'arrangement_id']);
    }
}
